package com.xyht.sca_s.student_manage_system.modules.teachAndStaffCheckInApplication.controller;


import com.xyht.sca_s.student_manage_system.auth.util.JwtTokenUtil;
import com.xyht.sca_s.student_manage_system.common.commonReturn.ResponseResult;
import com.xyht.sca_s.student_manage_system.common.desEncodeAndDecode.annotation.SecretBody;
import com.xyht.sca_s.student_manage_system.modules.teachAndStaffCheckInApplication.entity.vo.SmsTeachAdministrativeStaffCheckInApplicationProcessVO;
import com.xyht.sca_s.student_manage_system.modules.teachAndStaffCheckInApplication.service.SmsTeachAdministrativeStaffCheckInApplicationProcessService;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author XYHT
 * @since 2023-05-05
 */
@RestController
@RequestMapping("/teachAndStaffCheckInApplication/smsTeachAdministrativeStaffCheckInApplicationProcess")
@SecretBody
public class SmsTeachAdministrativeStaffCheckInApplicationProcessController {
    @Autowired
    SmsTeachAdministrativeStaffCheckInApplicationProcessService smsTeachAdministrativeStaffCheckInApplicationProcessService;

    @Autowired
    JwtTokenUtil jwtTokenUtil;
    @ApiModelProperty(value = "新增审批流程")
    @PostMapping("/smsTeachAdministrativeStaffCheckInApplicationProcessAdd")
    public ResponseResult smsTeachAdministrativeStaffCheckInApplicationProcessAdd(
                    @RequestBody SmsTeachAdministrativeStaffCheckInApplicationProcessVO
                    smsTeachAdministrativeStaffCheckInApplicationProcess){
        return smsTeachAdministrativeStaffCheckInApplicationProcessService.smsTeachAdministrativeStaffCheckInApplicationProcessAdd(
                    smsTeachAdministrativeStaffCheckInApplicationProcess);
    }

    @ApiModelProperty(value = "删除审批流程")
    @DeleteMapping("/deleteSmsTeachAdministrativeStaffCheckInApplicationProcess")
    public ResponseResult deleteSmsTeachAdministrativeStaffCheckInApplicationProcess(
            @RequestBody SmsTeachAdministrativeStaffCheckInApplicationProcessVO
                    smsTeachAdministrativeStaffCheckInApplicationProcess){
        return smsTeachAdministrativeStaffCheckInApplicationProcessService.deleteSmsTeachAdministrativeStaffCheckInApplicationProcess(
                smsTeachAdministrativeStaffCheckInApplicationProcess);
    }

    @ApiModelProperty(value = "修改审批流程")
    @PostMapping("/updateSmsTeachAdministrativeStaffCheckInApplicationProcess")
    public ResponseResult updateSmsTeachAdministrativeStaffCheckInApplicationProcess(
            @RequestBody SmsTeachAdministrativeStaffCheckInApplicationProcessVO
                    smsTeachAdministrativeStaffCheckInApplicationProcess){
        return smsTeachAdministrativeStaffCheckInApplicationProcessService.updateSmsTeachAdministrativeStaffCheckInApplicationProcess(
                smsTeachAdministrativeStaffCheckInApplicationProcess);
    }

    @ApiModelProperty(value = "流程列表")
    @GetMapping("/selectSmsTeachAdministrativeStaffCheckInApplicationProcess")
    public ResponseResult selectSmsTeachAdministrativeStaffCheckInApplicationProcess(){
        return smsTeachAdministrativeStaffCheckInApplicationProcessService.selectSmsTeachAdministrativeStaffCheckInApplicationProcess();
    }

    @ApiModelProperty(value = "审批人查询审批流程")
    @GetMapping("/selectSmsTeachAdministrativeStaffCheckInApplicationProcessByAllowPeople")
    public ResponseResult selectSmsTeachAdministrativeStaffCheckInApplicationProcessByAllowPeople(
            @RequestBody SmsTeachAdministrativeStaffCheckInApplicationProcessVO
                         smsTeachAdministrativeStaffCheckInApplicationProcess) {
        return smsTeachAdministrativeStaffCheckInApplicationProcessService.selectSmsTeachAdministrativeStaffCheckInApplicationProcessByAllowPeople(
                smsTeachAdministrativeStaffCheckInApplicationProcess);
    }

    @ApiModelProperty(value = "通过ID查询审批流程")
    @GetMapping("/selectSmsTeachAdministrativeStaffCheckInApplicationProcessById")
    public ResponseResult selectSmsTeachAdministrativeStaffCheckInApplicationProcessById(
            @RequestParam(value = "id", required = false) String id
    ) {
        return smsTeachAdministrativeStaffCheckInApplicationProcessService.selectSmsTeachAdministrativeStaffCheckInApplicationProcessById(id);
    }
}

